﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<CollegeWebsite.Models.StudentSubject>" %>

<%@ Import Namespace="CollegeWebsite.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

    <h2>
        AddSubject</h2>
    <% using (Html.BeginForm())
       {%>
    <%= Html.ValidationSummary(true) %>
    <fieldset>
        <legend>Fields</legend>
        <%-- <div class="editor-label">
                <%= Html.LabelFor(model => model.StudentSubjectID) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.StudentSubjectID) %>
                <%= Html.ValidationMessageFor(model => model.StudentSubjectID) %>
            </div>--%>
        <div class="editor-label">
            <%--<%= Html.LabelFor(model => model.Student.StudentName) %>--%>
        </div>
        <div class="editor-field">
            <%= Html.HiddenFor(model => model.StudentID) %>
            <%= Html.ValidationMessageFor(model => model.StudentID) %>
        </div>
        <div class="editor-label">
            <%--<%= Html.LabelFor(model => model.SubjectID) %>--%>
            Subject Name
        </div>
        <div class="editor-field">
            <%= Html.DropDownListFor(model => model.SubjectID,new SelectList((List<Subject>)ViewData["subject"],"SubjectID","SubjectName")) %>
            <%= Html.ValidationMessageFor(model => model.SubjectID) %>
        </div>
        <p>
            <input type="submit" value="Add New" />
        </p>
    </fieldset>
    <% } %>
    <div>
        <%= Html.ActionLink("Back to List", "Index") %>
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="TitleContentPlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptIncludePlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HeaderContentPlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="MenuContentPlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="Sidebar1ContentPlaceHolder" runat="server">
</asp:Content>
